﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DataTier
{
    public class Members
    {
        private string memberId;
        private string surname;
        private string firstname;
        private string email;
        private string password;
        private int points;

        public Members(string ID, string SURNAME, string FIRSTNAME, string EMAIL, string PASSWORD, int POINTS)
        {
            this.memberId = ID;
            this.surname = SURNAME;
            this.firstname = FIRSTNAME;
            this.email = EMAIL;
            this.password = PASSWORD;
            this.points = POINTS;
        }

        [System.ComponentModel.DataObjectField(true, true, false)]
        public string MemberID // identity field
        {
            get { return memberId; }
            set { MemberID = value; }
        }

        [System.ComponentModel.DataObjectField(false, false, false)]
        public string Surname
        {
            get { return surname; }
            set { Surname = value; }
        }

        [System.ComponentModel.DataObjectField(false, false, false)]
        public string FirstName
        {
            get { return firstname; }
            set { FirstName = value; }
        }

        [System.ComponentModel.DataObjectField(false, false, false)]
        public string Email
        {
            get { return email; }
            set { Email = value; }
        }

        [System.ComponentModel.DataObjectField(false, false, false)]
        public string Password
        {
            get { return password; }
            set { Password = value; }
        }

        [System.ComponentModel.DataObjectField(false, false, false)]
        public int Points
        {
            get { return points; }
            set { Points = value; }
        }
        public override string ToString()
        {
            return MemberID + ", " + FirstName + " " + Surname + ", Email: " + Email;
        }
    }
}
